<template>
  <div>
    <div id="main" style="width: 400px; height: 300px"></div>
  </div>
</template>

<script>
import * as echarts from 'echarts'

export default {
  methods: {},
  mounted() {
    var myChart = echarts.init(document.getElementById('main'))
    myChart.setOption({
      xAxis: {
        type: 'value'
      },
      yAxis: {
        type: 'category',
        data: [
          '江苏',
          '上海',
          '吉林',
          '浙江',
          '重庆',
          '北京',
          '辽宁',
          '安徽',
          '湖北',
          '四川'
        ]
      },
      series: [
        {
          data: [
            {
              value: 95572500,
              itemStyle: {
                color: '#a90000'
              }
            },
            {
              value: 65572500,
              itemStyle: {
                color: '#062000'
              }
            },
            {
              value: 59653035,
              itemStyle: {
                color: '#afec00'
              }
            },
            {
              value: 50504700,
              itemStyle: {
                color: '#a789c0'
              }
            },
            {
              value: 37406124,
              itemStyle: {
                color: '#a123f0'
              }
            },
            {
              value: 35364912,
              itemStyle: {
                color: '#a90000'
              }
            },
            {
              value: 31968000,
              itemStyle: {
                color: '#a90000'
              }
            },
            {
              value: 30210500,
              itemStyle: {
                color: '#a90000'
              }
            },
            {
              value: 24753000,
              itemStyle: {
                color: '#a90000'
              }
            },
            {
              value: 23183500,
              itemStyle: {
                color: '#a90000'
              }
            }
          ],
          type: 'bar'
        }
      ]
    })
  }
}
</script>

<style>
</style>
